﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace YArchitech.Revit
{
	public class HYDiverstyFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			if (elem.Category.Id.IntegerValue == -2001140)
			{
				Parameter parameter = elem.GetParameter("设备类别");
				if (parameter != null && parameter.AsString() == "分集水器")
				{
					return true;
				}
			}
			return false;
		}

		public bool AllowReference(Reference reference, XYZ position)
		{
			return false;
		}
	}
}
